import use from "../components/use";//个人用户界面
import waterpull from "../components/dynamicRecord"//所有动态界面
import record from "../components/record" //发布动态界面
import routerdt from "../components/routerdt"//主要界面
import jianguan from "../components/jianguan"//监管界面
import jianguandetil from "../components/jianguandeilt"//监管界面
import recorddetilt from "../components/recorddeilt"//动态详情界面
import Crop from '../components/photo/views/Crop.vue'
import zjzhd from '../components/photo/index.vue'
import hello from '../components/HelloWorld.vue'
import VueRouter from "vue-router";
import Vue from "vue";


Vue.use(VueRouter);

export default new VueRouter({
    routes:[
        {
            path:"/",
            component:routerdt,
            children:[
                {
                    path:"/use",
                    component:use
                },
                {
                    path:"/record",
                    component:waterpull
                }
            ]
        },
        {
            path: "/login",
            component:hello
        },
        {
            path:"/share",
            component:record
        },{
            path:"/recorddetilt",//详细内容
            name:"recorddetilt",
            component:recorddetilt
        },
        {
            path:"/jianguan",
            component:jianguan
        },{
            path:"/jianguandetil",//详细内容
            name:"jianguandetil",
            component:jianguandetil
        },
        {
            path: '/zjzhd',
            name: "zjzhd",
            component: zjzhd,
            children: [
                {
                    path: '/Crop',
                    name : 'Crop',
                    props : true,
                    component: Crop,
                  },
                  {
                    path: '/BgHandle',
                    name: 'BgHandle',
                    // route level code-splitting
                    // this generates a separate chunk (about.[hash].js) for this route
                    // which is lazy-loaded when the route is visited.
                    component: () => import(/* webpackChunkName: "about" */ '../components/photo/views/BgHandle.vue')
                  },
                  {
                    path: '/MoreTool',
                    name: 'MoreTool',
                    component: () => import(/* webpackChunkName: "about" */ '../components/photo/views/MoreTool.vue')
                  }
            ]
        },
    ]
})